package com.pureut.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pureut.order.domain.SalesOrderDetail;
import com.pureut.order.dto.DetailViewDto;
import com.pureut.order.dto.SalesOrderDetailDto;
import com.pureut.order.dto.SalesOrderDto;
import com.pureut.order.vo.GenerateInvoiceVo;
import com.pureut.order.vo.SalesOrderDetailVo;
import com.sale.common.mybatis.core.page.PageQuery;
import com.sale.common.mybatis.core.page.TableDataInfo;

import java.util.List;

/***
 * 销售订单明细service
 * Author:C
 * Date:2022/12/01 10:55
 * @DESC
 */
public interface SalesOrderDetailService {

    /**
     * 销售订单明细列表
     */
    TableDataInfo<SalesOrderDetailDto> getList(Long id, PageQuery pageQuery);

    /**
     * 查看销售订单明细
     */
    SalesOrderDetailDto getView(Long id);

    /**
     * 修改
     */
    boolean updateSalesOrderDetail(SalesOrderDetailVo salesOrderDetailVo);

    /**
     * 根据订单id和物料编码查询销售明细
     */
    DetailViewDto getDetailById(Long salesOrderId, String materialCode);

    /**
     * 生成发货单
     */
    boolean generateInvoice(GenerateInvoiceVo generateInvoiceVo) throws Exception;

    /**
     * 根据物料编码获取销售订单
     */
    List<SalesOrderDto> getOrderByMaterialCode(String materialCode);
}
